package tv.acgn.advertisement.publish.vo.user;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import tv.acgn.advertisement.publish.validator.group.GroupAdd;
import tv.acgn.advertisement.publish.validator.message.AdUserValidateMessage;
import tv.acgn.advertisement.publish.validator.regexp.PasswordValidRegExp;

/**
 * @program: advertisement-ad-pub-vo
 * @description: 用户服务 请求类
 * @author: junG
 * @create: 2019-05-02 01:19
 **/

@Data
public class AdUserRequestVO {

    @NotBlank(message = AdUserValidateMessage.userNameNotBlank, groups = {GroupAdd.class})
    private String userName;

    @NotBlank(message = AdUserValidateMessage.userPasswordNotBlank, groups = {GroupAdd.class})
    @Pattern(regexp = PasswordValidRegExp.StrongLevel,message = AdUserValidateMessage.userPwdRegError)
    @Length(min = 8, max = 16, message =AdUserValidateMessage.userPwdLengthError)
    private String password;
}
